package com.aloda.service.impl;

import com.aloda.pojo.entity.Book;
import com.aloda.mapper.BookMapper;
import com.aloda.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author aloda
 * @description 针对book的数据库操作Service实现
 * @createDate 2024-11-14
 */
@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BookMapper bookMapper;

    /**
     * 通过id查找图书
     *
     * @param id 图书id
     * @return book
     */
    @Override
    public Book selectBookById(Integer id) {
        return bookMapper.selectBookById(id);
    }
}
